import {post, postForm} from "../util/http";
import {AddMetaDataParam, UpdateMetaDataParam, PageQueryMetaDataParam, JobMetaDataVO} from "../model/MetaData";
import {PageQuery, PageResult} from "../model/Common";

export default {
    addMetaData(data: AddMetaDataParam): Promise<string> {
        return post<string>("/metadata/addMetaData", data);
    },
    deleteMetaData(id: bigint): Promise<string> {
        return postForm<string>("/metadata/deleteMetaData", {id});
    },
    updateMetaData(data: UpdateMetaDataParam): Promise<string> {
        return post<string>("/metadata/updateMetaData", data);
    },
    pageList(data: PageQuery<PageQueryMetaDataParam>): Promise<PageResult<JobMetaDataVO>> {
        return post<PageResult<JobMetaDataVO>>("/metadata/pageList", data);
    }
}